package org.aepscolombia.platform.models.entity;
// Generated Apr 8, 2014 9:37:27 AM by Hibernate Tools 3.2.1.GA


import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * Preparations generated by hbm2java
 */
@Entity
@Table(name="residuals_management")
public class ResidualsManagement  implements java.io.Serializable {

    private Integer idResMan;
    private ProductionEvents productionEvents;
    private ResidualsClasification residualsClasification;
    private Date dateResMan;
    private String otherResidualsManagementResMan;
    private Boolean status;
    private Integer createdBy;

    public ResidualsManagement() {
    }

	
    public ResidualsManagement(ProductionEvents productionEvents, Date dateResMan) {
        this.productionEvents = productionEvents;
        this.dateResMan = dateResMan;
    }
    
    public ResidualsManagement(ResidualsClasification residualsClasification, ProductionEvents productionEvents, Date dateResMan, String otherResidualsManagementResMan, Boolean status, Integer createdBy) {
       this.residualsClasification = residualsClasification;
       this.productionEvents = productionEvents;
       this.dateResMan = dateResMan;
       this.otherResidualsManagementResMan = otherResidualsManagementResMan;
       this.status = status;
       this.createdBy = createdBy;
    }
   
    @Id @GeneratedValue(strategy=IDENTITY)
    
    @Column(name="id_res_man", unique=true, nullable=false)
    public Integer getIdResMan() {
        return this.idResMan;
    }
    
    public void setIdResMan(Integer idResMan) {
        this.idResMan = idResMan;
    }
    
    @ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="id_residuals_type_res_man")
    public ResidualsClasification getResidualsClasification() {
        return this.residualsClasification;
    }
    
    public void setResidualsClasification(ResidualsClasification residualsClasification) {
        this.residualsClasification = residualsClasification;
    }
    
    @ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="id_production_event_res_man", nullable=false)
    public ProductionEvents getProductionEvents() {
        return this.productionEvents;
    }
    
    public void setProductionEvents(ProductionEvents productionEvents) {
        this.productionEvents = productionEvents;
    }
    
    @Temporal(TemporalType.TIMESTAMP)
    @Column(name="date_res_man", nullable=false, length=19)
    public Date getDateResMan() {
        return this.dateResMan;
    }
    
    public void setDateResMan(Date dateResMan) {
        this.dateResMan = dateResMan;
    }
    
    @Column(name="other_residuals_management_res_man", length=65535)
    public String getOtherResidualsManagementResMan() {
        return this.otherResidualsManagementResMan;
    }
    
    public void setOtherResidualsManagementResMan(String otherResidualsManagementResMan) {
        this.otherResidualsManagementResMan = otherResidualsManagementResMan;
    }
    
    @Column(name="status")
    public Boolean getStatus() {
        return this.status;
    }
    
    public void setStatus(Boolean status) {
        this.status = status;
    }
    
    @Column(name="created_by")
    public Integer getCreatedBy() {
        return this.createdBy;
    }
    
    public void setCreatedBy(Integer createdBy) {
        this.createdBy = createdBy;
    }




}


